﻿@model SoftHotel.Models.Promocion

@{
    ViewBag.Title = "Edit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Editar</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<link href="@Url.Content("~/Content/themes/base/jquery.ui.core.css")"  
        rel="stylesheet" type="text/css" /> 
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.datepicker.css")"  
        rel="stylesheet"  type="text/css" /> 
    <link href="@Url.Content("~/Content/themes/base/jquery.ui.theme.css")"  
        rel="stylesheet" type="text/css" /> 
 
    <script src="@Url.Content("~/Scripts/jquery.ui.core.js")"  
        type="text/javascript"></script> 
    <script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")"  
        type="text/javascript"></script> 
        <script src="@Url.Content("~/Scripts/jquery.validate.js")"  
        type="text/javascript"></script> 
    


<script type="text/javascript">
    $(document).ready(function () {



        $('.date').datepicker
        ({

            dayNamesMin: ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sa"],
            monthNames: ["January", "February", "March", "April", "Mayo", "Junio", "Julio", "August", "September", "October", "November", "December"],
            dateFormat: 'dd/mm/yy',
            minDate: 0

        });
    });
</script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Promocion</legend>

        <table id="MainContent_Table1" rules="none" style="border-color: Black; width: 900px; margin-bottom: 0px;">
	<tbody><tr>
	  <td style="width: 20px;"></td>
	  <td style="font-weight: bold;">Sede </td>
	  <td> 
       @Html.DisplayFor(model => model.nomSede)
     
      </td>
	  <td style="font-weight: bold;">Tipo </td>
	  <td><div class="editor-field">
          @Html.DisplayFor(model => model.nomTipo)
          
        </div></td>
	</tr><tr>
	  <td style="width: 20px;"></td>
	  <td style="font-weight: bold;">Estado </td>
	  <td> 
       @Html.DropDownListFor(model => model.nomEstado, Model.Estados, "--Seleccionar--")
         
            @Html.ValidationMessageFor(model => model.nomEstado)

         
      </td>
	  <td style="font-weight: bold;">Porcentaje </td>
	  <td><div class="editor-field">
          @Html.EditorFor(model => model.porcentaje)
            @Html.ValidationMessageFor(model => model.porcentaje)
        </div></td>
	</tr><tr>
	  <td style="width: 20px;"></td>
	  <td style="font-weight: bold;">Fecha Inicio </td>
	  <td><div class="editor-field">
         
               @Html.TextBox("fecha_ini", String.Format("{0:d}", (string)Model.fecha_ini.ToShortDateString()), new { @class = "date" })
           @Html.ValidationMessageFor(model => model.fecha_ini)
        </div> </td>
	  <td style="font-weight: bold;">Fecha Fin </td>
	  <td><div class="editor-field">
            
           @Html.TextBox("fecha_fin", String.Format("{0:d}", (string)Model.fecha_fin.ToShortDateString()), new { @class = "date" })
         
            @Html.ValidationMessageFor(model => model.fecha_fin)
        </div></td>
	</tr>
	<tr>
	  <td style="width: 20px;"></td>
	  <td style="font-weight: bold;">Cantidad de dias (solo tipo num. dias)</td>
	  <td><div class="editor-field">
             @Html.EditorFor(model => model.cant_dias)
            @Html.ValidationMessageFor(model => model.cant_dias)
        </div></td>
	  <td style="font-weight: bold;"></td>
	  <td></td>
	</tr>
	
	 
</tbody></table>

        <p>
            <input type="submit" value="Guardar" />
        </p>
    </fieldset>
    
}

@using (Html.BeginForm("Index","Promocion",FormMethod.Get))
{<p>
    <input type="submit" name="nuevo2" value="Volver" />
      
</p> }